package com.enjoy.ch4;

public class ByteCode1 {
    public static void main(String[] args) {
        System.out.println("Obj.v.v = " + Obj.v.v);
        try {
            Thread.sleep(Integer.MAX_VALUE);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    static class Obj{
        static {
            v = new Val("b");
        }

        static Val v = new Val("a");

        static {
            v.setV("c");
        }
    }

    static class Val{

        private String v;
        public Val(String v) {
            this.v = v;
        }

        public void setV(String v) {
            this.v = v;
        }
    }
}
